package com.lxt.cloud.teststream.controller;

import com.lxt.cloud.teststream.channel.ReceiveInputChannel;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

@Component
@EnableBinding(ReceiveInputChannel.class)
public class TestStreamCustomController {

    @StreamListener(ReceiveInputChannel.MSG_RECEIVER)
    public void input(Message<String> message){
        System.out.println("custom消费者：" + message.getPayload());
    }

}
